const path = require("path");
const ejsEngine = require("koa-ejs");
// import path from 'path';
// import ejsEngine from 'koa-ejs';
// 视图模板中间件

module.exports = (app) => {
  ejsEngine(app, {
    root: path.join(__dirname, '/../../views'),
    layout: 'tpl',
    viewExt: 'ejs',
    cache: true,
    debug: false,
  });
};